wx.getLocation({
              type: 'wgs84', // 默认为wgs84的gps坐标，如果要返回直接给openLocation用的火星坐标，可传入'gcj02'
              success: function (res) {
                  var latitude = res.latitude; // 纬度，浮点数，范围为90 ~ -90
                  var longitude = res.longitude; // 经度，浮点数，范围为180 ~ -180。
                  var speed = res.speed; // 速度，以米/每秒计
                  var accuracy = res.accuracy; // 位置精度
               
              alert(latitude+","+longitude);
               $.get("http://apis.map.qq.com/ws/geocoder/v1/?location="+latitude+","+longitude+"&key=POJBZ-FB4WU-ZARV2-4IJJA-UCG56-HOFLQ&get_poi=0&output=jsonp&callback=?",function(data) {
               console.log(data);
               if(data.status==0){
                var province = data.result.address_component.province;
                alert(province);
               province = preg_replace('/市/',"",province);
               province = preg_replace('/省/',"",province);
               var city = data.result.address_component.city;
               var qu = data.result.address_component.district;
                alert(qu);
                city = preg_replace('/市/',"",city);
                alert(city);
               $("#address1").val(province+" "+city+" "+qu);
               $("#address2").val(province+" "+city+" "+qu);
               
               }
               
              },'jsonp');   
                
              }
          });